//
//  Songer.m
//  NewMusic
//
//  Created by dllo on 15/11/23.
//  Copyright © 2015年 Going. All rights reserved.
//

#import "Songer.h"
#import "MusicType.h"
@implementation Songer
- (void)dealloc
{
    [_albumName release];
    [_name release];
    [_singerName release];
    [_auditionList release];
    [super dealloc];
}
- (void)setValue:(id)value forUndefinedKey:(NSString *)key
{
    
}
- (void)setValue:(id)value forKey:(NSString *)key
{
    [super setValue:value forKey:key];
    if ([key isEqual:@"auditionList"])
    {
        self.auditionList = [NSMutableArray array];
        NSArray *arr = (NSArray *)value;
        for (NSDictionary *dic in arr)
        {
            MusicType *music = [MusicType new];
            [music setValuesForKeysWithDictionary:dic];
            [self.auditionList addObject:music];
            [music release];
        }
    }
    if ([key isEqual:@"albumId"])
    {
        self.albumId = [NSString stringWithFormat:@"%ld", [value integerValue]];
    }
    if (value == nil)
    {
        value = @"nil";
    }
}
@end
